<?php
    include "../mysql/mysql.php";
    $aa = new mysql;
    $aa->link("");
    include "../myfunction.php";
    $bb= new myfunction;
$r2proid = '';	
$r2class = '3';  //no  int
$r2proname = 'mlml';  //no  varchar
$imgsrc = 'mlml';	// yes varchar  default null
$r2showorder = '';  //yes int defoult 0
	
	
if($r2proid == ''){ 
	$sql= "INSERT INTO product_info (class_id, name, imgsrc, show_order, price) 
                       VALUES ($r2class, '$r2proname', '$imgsrc', $r2showorder, 99 ) ";
	}
	else{ 
		$sql = "UPDATE product_info SET name= '$r2proname' class_id= '".$r2class."' imgsrc= '$imgsrc' 
		   WHERE id=".$r2proid." ";  
		}

       $result= $aa->excu($sql);

if ($result == TRUE) {
	echo "666666"; }
	
	
?>	
	
class_id= '".$r2class."' name= '$r2proname' imgsrc= '$imgsrc' show_order= '$r2showorder'
	
	